home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3494 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.7 KB

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Fastest way to clear a Window?
  5. Date: 21 Feb 1996 02:27:54 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4gdvva$mtb@sunsystem5.informatik.tu-muenchen.de>
  9. References: <4fck5b$7mm@leofric.coventry.ac.uk> <oj6zqanjdm6.fsf@hpsrk.fc.hp.com>
  10. NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Steve Koren (koren@hpsrk.fc.hp.com) wrote:
  14.  
  15. : sschaem@teleport.com (Stephan Schaem) wrote:
  16.  
  17. : > .. REPEAT 64
  18. : >    move.l d0,(a0)+
  19. : >    ENDR
  20. : >    loop ..
  21.  
  22. Hey people, still searching for a mega-clearwin-loop ?
  23. This one is the fastest ever known on AGA:
  24.  
  25. loop:
  26.     move.l d0,(a0)+
  27.     dbra d7,loop
  28.  
  29. this is no joke!
  30.  
  31. max store speed is 8 cycles (14MHz). on A4000/040 it is even more.
  32.  
  33. 8 cycles, that means 6 free cycles on 020 (free as long as you don't
  34. do another mem-acess). 6 cycles is sufficient to do the dbra.
  35.  
  36. I'm always very amused to see those REPEAT movem megaroutines for 
  37. chipmem clear :)
  38.  
  39. : > 
  40. : >  For layered window you want the os to call you for each cliped region
  41. : >  and do a 3 pass clear... 32bit masked left/right side, then simple move 
  42. : >  for the the middle. The OS probably use the blitter and use a A/B/D mode for
  43.  
  44. : No, no, no, no, no.
  45.  
  46. hehe, this hot chokolate is yummi ;)
  47.  
  48. : The problem here is that if you clear a window by writing data to its
  49. : bitmap, when running on a graphics card you'll be shoving all that
  50. : (redundant) data over the Z-III bus.  This is incredibly inefficient,
  51.  
  52. ah sorry, you didn't talk about chipmem ?
  53. well, people, are you sure you can poke into the bitmap of a
  54. gfx-screen directly ? I was told this is illegal. Means if it works
  55. on your board, it maybe won't work on your friends...
  56.  
  57. what about a gfx-lib call ? It will clean also partially hidden
  58. windows, and if your gfx-card got a blitter, wroooom!
  59.  
  60. I hope this will do it:
  61.  
  62. gfx.lib call: ClearScreen(window->rastport);
  63.  
  64. Well, the name is puzzling but docs say it works on a rastport.
  65. Works on V1.2, too ;)
  66.  
  67. : when the graphics card has onboard hardware that can clear a region much
  68. : faster than you ever could, if you just ask it to nicely.
  69.  
  70. : This sort of programming leads to behaviors such as the painfully slow
  71. : LW4.0 Layout refresh speed on graphics cards, compared to say Vertex
  72. : which is easily 20X as fast.  LW4.0 is practically unusable because of
  73. : this.
  74.  
  75. : Use the gfx.library functions.  They're there for a reason.
  76.  
  77. Not always, but this time.
  78.  
  79. :    - steve
  80. ------------------------------------------------------------------------
  81.    fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)   =:)
  82.  
  83.  
  84.  
  85.